import React from 'react';

let currentLanguage = 'zh-CN'
let languages = {
  'zh-CN': {
    'video': '视频教程',
    'doc': {
      'text': '开发文档',
      'url': 'https://hyperf.wiki'
    },
    'github': 'Github',
    'gitee': 'Gitee(码云)',
    'start-button': '快速开始',
    'content00-text1': '简单化 协程化 组件化',
    'content00-block0-title': '开箱即用，快人一步',
    'content00-block0-content': '官方提供超多常用组件，随用随取',
    'content00-block1-title': '原生协程，超高性能',
    'content00-block1-content': '原生协程能力支持，性能强悍',
    'content00-block2-title': '丰富组件，任意组合',
    'content00-block2-content': '全组件化设计，可复用于其它框架',
    'content30-title': '生产级别的协程框架',
    'content30-content': '由 Swoole 4 原生协程强力驱动',
    'content30-block0-title': '高性能',
    'content30-block0-content': '全协程异步实现，性能远超所有传统 PHP-FPM 框架',
    'content30-block1-title': '生产可用',
    'content30-block1-content': '经历过长时间生产环境考验的企业级框架设计，稳定可靠',
    'content30-block2-title': '微服务',
    'content30-block2-content': '健全的微服务体系，gRPC、JSON RPC、服务发现、熔断，灵活完善',
    'content30-block3-title': '组件丰富',
    'content30-block3-content': '全组件化设计，超多常用组件，绝大部分组件均可复用于其它框架',
    'content30-block4-title': '分布式',
    'content30-block4-content': '基于相关组件可快速搭建出企业级的分布式系统，极速扩容',
    'content30-block5-title': '自动化测试',
    'content30-block5-content': '完备的自动化测试，从开发到生产交付全流程保障',
  },
  'en-US': {
    'video': 'Video',
    'doc': {
      'text': 'Documentation',
      'url': 'https://hyperf.wiki/#/en/'
    },
    'github': 'Github',
    'gitee': 'Gitee',
    'start-button': 'Get started',
    'content00-text1': 'Convenient, Concurrent, Composite',
    'content00-block0-title': 'Productivity Out of Box',
    'content00-block0-content': 'Just pull in components and start working',
    'content00-block1-title': 'Native Coroutine',
    'content00-block1-content': 'Make the most of the cutting-edge swoole engine',
    'content00-block2-title': 'Plugable Interface',
    'content00-block2-content': 'Open arms to the vast ecosystem',
    'content30-title': 'Production-grade coroutine framework',
    'content30-content': 'Powered by Swoole 4 coroutine',
    'content30-block0-title': 'High performance',
    'content30-block0-content': 'Unblocked I/O provides decisive benchmark victory over PHP-FPM',
    'content30-block1-title': 'Production-ready',
    'content30-block1-content': 'Battle-tested in the most crucial business environment',
    'content30-block2-title': 'Microservice',
    'content30-block2-content': 'Embrace microservice with gRPC, JSON-RPC, service discovery, circuit-breaker, etc',
    'content30-block3-title': 'Decoupled components',
    'content30-block3-content': 'Hyperf offers a rich pool of components. Most can be used outside of the framework',
    'content30-block4-title': 'Distributed',
    'content30-block4-content': 'Decentralized architecture. Scales up to an unlimited amount of servers',
    'content30-block5-title': 'Tested',
    'content30-block5-content': 'Fully Automated tests cover from development to delivery',
  }
}

if (navigator.language && navigator.language !== 'zh-CN') {
  currentLanguage = 'en-US'
}

export const Nav00DataSource = {
  wrapper: { className: 'header0 home-page-wrapper jwbweljfrfi-editor_css' },
  page: { className: 'home-page jwbwg2b25dc-editor_css' },
  logo: {
    className: 'header0-logo jwbwdwdhgqr-editor_css',
    children: 'https://hyperf.oss-cn-hangzhou.aliyuncs.com/hyperf.png',
  },
  Menu: {
    className: 'header0-menu',
    children: [
      {
        name: 'item0',
        a: {
          children: languages[currentLanguage]['video'],
          href: 'https://course.swoole-cloud.com/videos/5/hot?from=hyperf.io',
          className: 'jwbwev2ey7-editor_css',
        },
      },
      {
        name: 'item0',
        a: {
          children: languages[currentLanguage]['doc']['text'],
          href: languages[currentLanguage]['doc']['url'],
          className: 'jwbwev2ey7-editor_css',
        },
      },
      {
        name: 'item1',
        a: {
          children: languages[currentLanguage]['github'],
          href: 'https://github.com/hyperf/hyperf',
          className: 'jwbwf54e8hn-editor_css',
        },
      },
      {
        name: 'item1',
        a: {
          children: languages[currentLanguage]['gitee'],
          href: 'https://gitee.com/hyperf/hyperf',
          className: 'jwbwf54e8hn-editor_css',
        },
      },
    ],
  },
  mobileMenu: { className: 'header0-mobile-menu' },
};
export const Banner30DataSource = {
  wrapper: { className: 'banner3 jwbvg9mw5gi-editor_css' },
  textWrapper: {
    className: 'banner3-text-wrapper',
    children: [
      {
        name: 'nameEn',
        className: 'banner3-name-en',
        children: (
          <>
            <p>
              <br />
            </p>
          </>
        ),
      },
      {
        name: 'slogan',
        className: 'banner3-slogan jwbvhicx5l-editor_css',
        children: 'The Way to PHP Microservice',
        texty: true,
      },
      {
        name: 'name',
        className: 'banner3-name jwbvj2078d8-editor_css',
        children: (
          <>
            <p>Hyperf = Hyperspeed + Flexibility</p>
          </>
        ),
      },
      {
        name: 'button',
        className: 'banner3-button jwbvker8eo-editor_css',
        children: (
          languages[currentLanguage]['start-button']
        ),
        href: languages[currentLanguage]['doc']['url']
      },
      {
        name: 'time',
        className: 'banner3-time',
        children: (
          <>
            <p>
              <br />
            </p>
          </>
        ),
      },
    ],
  },
};
export const Content00DataSource = {
  wrapper: {
    className: 'home-page-wrapper content0-wrapper jwq3fv7xmf-editor_css',
  },
  page: { className: 'home-page content0' },
  OverPack: { playScale: 0.3, className: '' },
  titleWrapper: {
    className: 'title-wrapper',
    children: [
      {
        name: 'title',
        children: (
          languages[currentLanguage]['content00-text1']
        ),
      },
    ],
  },
  block: {
    className: 'block-wrapper',
    children: [
      {
        name: 'block0',
        className: 'block',
        md: 8,
        xs: 24,
        children: {
          icon: {
            className: 'icon',
            children:
              '',
          },
          title: {
            className: 'content0-title',
            children: (
              languages[currentLanguage]['content00-block0-title']
            ),
          },
          content: {
            children: (
              languages[currentLanguage]['content00-block0-content']
            ),
          },
        },
      },
      {
        name: 'block1',
        className: 'block',
        md: 8,
        xs: 24,
        children: {
          icon: {
            className: 'icon',
            children:
              '',
          },
          title: {
            className: 'content0-title',
            children: (
              languages[currentLanguage]['content00-block1-title']
            ),
          },
          content: {
            children: (
              languages[currentLanguage]['content00-block1-content']
            ),
          },
        },
      },
      {
        name: 'block2',
        className: 'block',
        md: 8,
        xs: 24,
        children: {
          icon: {
            className: 'icon',
            children:
              '',
          },
          title: {
            className: 'content0-title',
            children: (
                languages[currentLanguage]['content00-block2-title']
            ),
          },
          content: {
            children: (
                languages[currentLanguage]['content00-block2-content']
            ),
          },
        },
      },
    ],
  },
};
export const Content30DataSource = {
  wrapper: {
    className: 'home-page-wrapper content3-wrapper jwq3fnvddaf-editor_css',
  },
  page: { className: 'home-page content3 jwq3bo8n6w-editor_css' },
  OverPack: { playScale: 0.3 },
  titleWrapper: {
    className: 'title-wrapper',
    children: [
      {
        name: 'title',
        children: (
          languages[currentLanguage]['content30-title']
        ),
        className: 'title-h1',
      },
      {
        name: 'content',
        className: 'title-content',
        children: (
          languages[currentLanguage]['content30-content']
        ),
      },
    ],
  },
  block: {
    className: 'content3-block-wrapper',
    children: [
      {
        name: 'block0',
        className: 'content3-block',
        md: 8,
        xs: 24,
        children: {
          icon: {
            className: 'content3-icon',
            children:
              '',
          },
          textWrapper: { className: 'content3-text' },
          title: {
            className: 'content3-title',
            children: (
                languages[currentLanguage]['content30-block0-title']
            ),
          },
          content: {
            className: 'content3-content',
            children: (
                languages[currentLanguage]['content30-block0-content']
            ),
          },
        },
      },
      {
        name: 'block1',
        className: 'content3-block',
        md: 8,
        xs: 24,
        children: {
          icon: {
            className: 'content3-icon',
            children:
              '',
          },
          textWrapper: { className: 'content3-text' },
          title: {
            className: 'content3-title',
            children: (
                languages[currentLanguage]['content30-block1-title']
            ),
          },
          content: {
            className: 'content3-content',
            children: (
                languages[currentLanguage]['content30-block1-content']
            ),
          },
        },
      },
      {
        name: 'block2',
        className: 'content3-block',
        md: 8,
        xs: 24,
        children: {
          icon: {
            className: 'content3-icon',
            children:
              '',
          },
          textWrapper: { className: 'content3-text' },
          title: {
            className: 'content3-title',
            children: (
              languages[currentLanguage]['content30-block2-title']
            ),
          },
          content: {
            className: 'content3-content',
            children: (
                languages[currentLanguage]['content30-block2-content']
            ),
          },
        },
      },
      {
        name: 'block3',
        className: 'content3-block',
        md: 8,
        xs: 24,
        children: {
          icon: {
            className: 'content3-icon',
            children:
              '',
          },
          textWrapper: { className: 'content3-text' },
          title: {
            className: 'content3-title',
            children: (
              languages[currentLanguage]['content30-block3-title']
            ),
          },
          content: {
            className: 'content3-content',
            children: (
                languages[currentLanguage]['content30-block3-content']
            ),
          },
        },
      },
      {
        name: 'block4',
        className: 'content3-block',
        md: 8,
        xs: 24,
        children: {
          icon: {
            className: 'content3-icon',
            children:
              '',
          },
          textWrapper: { className: 'content3-text' },
          title: {
            className: 'content3-title',
            children: (
              languages[currentLanguage]['content30-block4-title']
            ),
          },
          content: {
            className: 'content3-content',
            children: (
                languages[currentLanguage]['content30-block4-content']
            ),
          },
        },
      },
      {
        name: 'block5',
        className: 'content3-block',
        md: 8,
        xs: 24,
        children: {
          icon: {
            className: 'content3-icon',
            children:
              '',
          },
          textWrapper: { className: 'content3-text' },
          title: {
            className: 'content3-title',
            children: (
              languages[currentLanguage]['content30-block5-title']
            ),
          },
          content: {
            className: 'content3-content',
            children: (
              languages[currentLanguage]['content30-block5-content']
            ),
          },
        },
      },
    ],
  },
};
export const Footer00DataSource = {
  wrapper: {
    className: 'home-page-wrapper footer0-wrapper jwq3bq34q9r-editor_css',
  },
  OverPack: { className: 'home-page footer0', playScale: 0.05 },
  copyright: {
    className: 'copyright',
    children: (
      <>
        <span>©2018-2020 Hyperf&nbsp;All Rights Reserved</span>
      </>
    ),
  },
};
